FROM openjdk:8-jdk
EXPOSE 8080

VOLUME /tmp

ARG profile
ENV profile=${profile}

RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone

ADD target/renren-admin.jar /app.jar
RUN bash -c 'touch /app.jar'
ENTRYPOINT ["java","-jar", "-Duser.timezone=Asia/Shanghai", "/app.jar", "--spring.profiles.active=${profile}"]
